package gamefw.gameplugin;

import gamefw.uiplugin.IInputManager;

/**
 * The Interface IPlayer represents a player of the game.
 * Concrete implementations of either a human or computer player should implement
 * this interface.
 */
public abstract class AbstractPlayer {

	private int index;
	
	/**
	 * This method should implement the logic for a player move.
	 * A computer player should implement all the required artificial intelligence in this method.
	 * A human player should delegate to the user interface to get the player selection of movement.
	 */
	public abstract PlayResult play(GameBoard board, IInputManager inputManager);

	/**
	 * Gets the player index for this player
	 * @return player index
	 */
	public int getIndex() {
		return index;
	}

	/**
	 * Sets the player index for this player
	 * @param index player index
	 */
	public void setIndex(int index) {
		this.index = index;
	}
	
}
